package top.yangbuyi.product.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.yangbuyi.product.service.ProductKindService;

/**
 * @ClassName: ProductKindController
 * @Author: campsis-tk
 * @Date: 2020/7/16 14:35
 * @Description:
 **/
@RestController
@RequestMapping("/api/productkind")
public class ProductKindController {

	@Autowired
	private ProductKindService productKindService;

	/**
	 * @Description: 查询出一级分类
	 * @return: java.lang.Object
	 * @Author: campsis-tk
	 * @Date: 2020/7/16
	 */
	@GetMapping("queryFirstProductKind")
	public Object queryFirstProductKind() {
		return this.productKindService.queryFirstProductKind();
	}

	/**
	 * @Description: 查询出其他分类
	 * @param id
	 * @return: java.lang.Object
	 * @Author: campsis-tk
	 * @Date: 2020/7/16
	 */
	@GetMapping("queryProductKind")
	public Object queryProductKind(Integer id) {
		return this.productKindService.queryProductKind(id);
	}

}
